package com.zjw.mybatis.model;

/**
 * Person --> IdCard
 * one to one 关系
 * @author zjw
 *
 */
public class Person {

	private long id;
	private String name;
	/**
	 * 与Person对象关联的IdCard对象,one2one关系
	 */
	private IdCard idCard;
	
	public Person() {
		super();
	}
	
	public Person(String name, IdCard idCard) {
		super();
		this.name = name;
		this.idCard = idCard;
	}

	public IdCard getIdCard() {
		return idCard;
	}
	public void setIdCard(IdCard idCard) {
		this.idCard = idCard;
	}
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Override
	public String toString() {
		return "Person [id=" + id + ", name=" + name + ", idCard=" + idCard
				+ "]";
	}
	
}
